<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>缩放</title>
    <style>
        div {
            width: 600px;
            height: 400px;
            background-color: pink;
            border: 1px solid #000;
            margin: 100px auto;
        }

        img {
            transition: all 5s;
            width: 300px;
        }

        div:hover img {
            /* 
                缩放:大于1是放大,小于1是缩小,等于1不改变
            */
            transform: scale(2);
        }
    </style>
</head>

<body>
    <div>
        <img src="./img/heart.png" alt="">
    </div>
</body>

</html>